const BASE_URL = 'http://localhost:3000';

// 封装uni.request()
export default function(options){
	return new Promise(function(response,reject){
		uni.request({
			url:BASE_URL + options.url,
			data:options.data || {},
			method:options.method || 'get',
			success(res){
				response(res);
			},
			fail(err){
				reject(err);
			}
		})
	})
}